import { createStore } from 'vuex'

export default createStore({
    state: { 
        opened: false, // 侧边栏菜单是否展开
        userInfo: {}
    },
    mutations : {
        toggleSideBar(state, payload) {
            state.opened = payload;
        },
        saveUserInfo(state, payload){
            state.userInfo = payload;
        }
    },
    actions : {},
    modules : {}
})